#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <unordered_set>
#include <map>
#include <deque>

using namespace std;

class Solution {
public:
	// 双指针
    bool isPalindrome(int x) {
		string xStr = to_string(x);
		int left = 0;
		int right = xStr.size() - 1;
		while(left <= right){
			if(xStr[left] == xStr[right]){
				left++;
				right--;
			}else{
				return false;
			}
		}
		return true;
    }
	// stl 字符串翻转
	bool isPalindrome1(int x) {
		string s1,s2;
        s1 = s2 = to_string(x);
		reverse(s2.begin(), s2.end());
		if(s2 != s1){
			return false;
		}
		return true;
    }
	
	// 出栈入栈
	bool isPalindrome2(int x) {
		if(x % 10 == 0){
			return false;
		}
		deque<int> d;
		while(x != 0){
			d.push_back(x%10);
			x = x/10;
		}
		while(!d.empty()){
			if(d.size() > 1){
				cout << d.front() << " " << d.back();
				if(d.front() != d.back()){
					
					return false;
				} else {
					d.pop_front();
					d.pop_back();
				}
			} else {
				return true;
			}
		}
		return true;
    }
};

int main(){
	Solution so;
	int input = -121;
	bool a = so.isPalindrome2(input);
	
	if(a){
		cout << "yes" << endl;
	}else{
		cout << "no" << endl;
	}
	return 0;
	
}